Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Update linkTo documentation #11

Merged
merged 2 commits into from
Apr 27, 2017
Merged

Conversation

shilman
Copy link
Contributor

@shilman shilman commented Apr 27, 2017

Issue: #10

What I did

Links used to be an add-on, but are now supported natively in
storybook. Updated the docs to reflect that.

Links used to be an add-on, but are now supported natively in
storybook. Updated the docs to reflect that.
Copy link
Contributor

@xavxyz xavxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!! ✅ It just misses a i to "Simlar to Invision..."


With that, you can link an event in a component to any story in the Storybook.

* First parameter is the the story kind (what you named with storiesOf).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra "the"

* Second parameter is the story name (what you named with .add).

You can also pass a function instead for any of above parameter. That function accepts arguments emitted by the event and it should return a string.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe here could be a short example, like:

linkTo(() => 'Button', () => 'Second')

@usulpro
Copy link
Member

usulpro commented Apr 27, 2017

Great! 👍

But do I miss something with addon-links? Confused that it still imported as a separated package but there aren't any package in storybook? Where is the actual source code now?

@shilman
Copy link
Contributor Author

shilman commented Apr 27, 2017

Great catch @usulpro . I'll fix the documentation and file a bug on storybooks for followup.

@shilman shilman merged commit 717d6ee into source Apr 27, 2017
@shilman shilman deleted the 10-update-linkto-documentation branch April 27, 2017 21:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants